package com.ruoyi.crm.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseFlowEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 合同数据对象 crm_contract
 *
 * @author yanwenliang
 * @date 2024-11-13
 */
@Data
@TableName("crm_contract")
public class CrmContract extends BaseFlowEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同id */
    @TableId(type = IdType.ASSIGN_ID)
    private String contractId;

    /** 商机id */
    private String orderId;

    /** 项目id */
    @Excel(name = "项目id")
    private String projectId;

    /** 合同总金额 */
    @Excel(name = "合同总金额")
    private BigDecimal totalMoney;

    /** 合同时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date totalTime;

    /** 合同路径 */
    @Excel(name = "合同路径")
    private String contractUrl;

    /** 有无合同选项（0 无 1 有） */
    @Excel(name = "有无合同选项", readConverterExp = "0=,无=,1=,有=")
    private String isContract;

    /** 采购合同 */
    @Excel(name = "采购合同")
    private String purchaseContractUrl;

    /** 采购合同选无字段（0 无 1 有） */
    @Excel(name = "采购合同选无字段", readConverterExp = "0=,无=,1=,有=")
    private String isPurchaseContract;

    /** 归属人 */
    @Excel(name = "归属人")
    private String userId;


    /** 删除标记（0 未删除 1 删除） */
    @TableLogic
    private String delFlag;

    /**
     * 备注
     */
    private String remark;


    @TableField(exist = false)
    private String customerId;

    @TableField(exist = false)
    private String orderName;
}
